/*******************************************************************************
 * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others
 * 
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 * 
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *  Eurotech
 *******************************************************************************/
package org.eclipse.kura.core.test;

import org.eclipse.kura.comm.CommURI;
import org.eclipse.kura.test.annotation.TestTarget;
import org.junit.Test;

import junit.framework.TestCase;

public class CommURITest extends TestCase {

    @TestTarget(targetPlatforms = { TestTarget.PLATFORM_ALL })
    @Test
    public void testSyntax() throws Exception {
        CommURI commUri = new CommURI.Builder("/dev/ttyUSB0").withBaudRate(4800).build();
        System.out.println(commUri);

        CommURI commUri1 = CommURI.parseString(commUri.toString());
        System.out.println(commUri1);

        assertEquals(commUri1.toString(), commUri.toString());
    }

}
